using System.Windows.Forms;
using DataStubGenerator.Controls;

namespace DataStubGenerator
{
    public partial class SqlEditView : RichTextBox, ISqlEditView
    {
        readonly SqlEditPresenter _presenter;

        public SqlEditView()
        {
            InitializeComponent();
            _presenter = new SqlEditPresenter(this, new SqlModel());
        }

        #region ISqlEditView Members

        public void HighlightWord(Highlight highlight)
        {
            SelectionStart = highlight.Position;
            SelectionLength = highlight.Length;
            SelectionColor = highlight.Color;
            DeselectAll();            
        }

        #endregion
    }
}